This repository was archived by the owner on Jan 13, 2021. It is now read-only.
Add python 3.6 to the test suite#348
Merged
Lukasa merged 3 commits intopython-hyper:developmentfrom Sep 2, 2017
Merged
Conversation
KostyaEsmukov
commented
Sep 2, 2017
|
|
||
| assert not hyper.tls._context.check_hostname | ||
| assert hyper.tls._context.verify_mode == ssl.CERT_NONE | ||
| assert hyper.tls._context.options & ssl.OP_NO_COMPRESSION == 0 |
Contributor
Author
There was a problem hiding this comment.
Python 3.6 fails on this line with an error:
______________________________________________________________________________ TestSSLContext.test_custom_context _________
self = <test_SSLContext.TestSSLContext object at 0x10d106b70>
def test_custom_context(self):
# The following SSLContext doesn't provide any valid certicate.
# Its purpose is only to confirm that hyper is not using its
# default SSLContext.
context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
context.verify_mode = ssl.CERT_NONE
context.check_hostname = False
hyper.tls._context = context
assert not hyper.tls._context.check_hostname
assert hyper.tls._context.verify_mode == ssl.CERT_NONE
> assert hyper.tls._context.options & ssl.OP_NO_COMPRESSION == 0
E AssertionError: assert (<Options.OP_ALL|OP_NO_SSLv3|OP_NO_SSLv2|OP_CIPHER_SERVER_PREFERENCE|OP_SINGLE_DH_USE|OP_SINGLE_ECDH_USE|OP_NO_COMPRESSION: 2203714559> & <Options.OP_NO_COMPRESSION: 131072>) == 0
E + where <Options.OP_ALL|OP_NO_SSLv3|OP_NO_SSLv2|OP_CIPHER_SERVER_PREFERENCE|OP_SINGLE_DH_USE|OP_SINGLE_ECDH_USE|OP_NO_COMPRESSION: 2203714559> = <ssl.SSLContext object at 0x10d102898>.options
E + where <ssl.SSLContext object at 0x10d102898> = <module 'hyper.tls' from '/Users/kostya/Code/_contrib/hyper/hyper/tls.py'>._context
E + where <module 'hyper.tls' from '/Users/kostya/Code/_contrib/hyper/hyper/tls.py'> = hyper.tls
E + and <Options.OP_NO_COMPRESSION: 131072> = ssl.OP_NO_COMPRESSION
test/test_SSLContext.py:43: AssertionError
From what I understand this check is not essential in the test. Please let me know if I'm wrong.
Member
There was a problem hiding this comment.
This whole test seems kinda stupid, to be honest, but yeah, this line is non-essential.
Lukasa
suggested changes
Sep 2, 2017
|
|
||
| assert not hyper.tls._context.check_hostname | ||
| assert hyper.tls._context.verify_mode == ssl.CERT_NONE | ||
| assert hyper.tls._context.options & ssl.OP_NO_COMPRESSION == 0 |
Member
There was a problem hiding this comment.
This whole test seems kinda stupid, to be honest, but yeah, this line is non-essential.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.